<template>
  <div class="panel-box">
    <div class="header">
      <img class="left-icon" src="@/assets/images/yiping/left.png" alt="" />
      <div>{{ title }}</div>
      <img class="right-icon" src="@/assets/images/yiping/right.png" alt="" />
    </div>
    <div class="line"></div>
    <div class="con">
      <slot style="height: 100%"></slot>
    </div>
  </div>
</template>
<script setup>
import { ref } from "vue";
defineOptions({
  name: "panelBox",
});

const props = defineProps({
  title: {
    type: String,
    default: "面板标题",
  },
});
</script>
<style scoped lang="scss">
.panel-box {
  width: 100%;
  height: 100%;
  position: relative;
  background: rgba($color: #0057ff, $alpha: 0.4);
  border-radius: 8px;
  display: flex;
  flex-direction: column;

  .header {
    padding: 12px 16px;
    font-size: 18px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .line {
    width: 94%;
    margin-left: 3%;
    height: 2px;
    background: linear-gradient(
      to right,
      rgba(38, 140, 217, 0) 0%,
      rgba(38, 140, 217, 1) 50%,
      rgba(38, 140, 217, 0) 100%
    );
    margin-bottom: 12px;
  }
  .con {
    flex: 1;
    overflow: hidden;
    position: relative;
  }
}
</style>
